package com.itheima.web.controller;

import com.itheima.vo.AnalysisSummaryVo;
import com.itheima.web.manager.AnalysisManager;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

@RestController
public class AnalysisController {

    @Autowired
    private AnalysisManager analysisManager;

    //概要统计
    @GetMapping("/dashboard/summary")
    public AnalysisSummaryVo summary() {
        return analysisManager.summary();
    }

    //概要分析图
    @GetMapping("/dashboard/users")
    public Map Analysis(Long sd,Long ed,String type){
       return analysisManager.analysisSummary(sd,ed,type);
    }
}
